package com.gtenacg.cartoonservice.service.impl;

import com.gtenacg.cartoonservice.mapper.RelationNovelTypeMapper;
import com.gtenacg.cartoonservice.pojo.model.RelationNovelType;
import com.gtenacg.cartoonservice.service.RelationNovelTypeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86198
* @description 针对表【gt_relation_novel_type(小说类型联系表)】的数据库操作Service实现
* @createDate 2024-05-22 08:46:33
*/
@Service
@RequiredArgsConstructor
public class RelationNovelTypeServiceImpl implements RelationNovelTypeService{
    private final RelationNovelTypeMapper relationTypeMapper;

    @Override
    public List<RelationNovelType> list() {
        return relationTypeMapper.list();
    }

    @Override
    public List<RelationNovelType> search(Integer nid, Integer ntid) {
        return relationTypeMapper.search(nid, ntid);
    }


    @Override
    public List<RelationNovelType> getByNids(List<Integer> nids) {
        return relationTypeMapper.getByNids(nids);
    }

    @Override
    public List<RelationNovelType> getByTids(List<Integer> tids) {
        return relationTypeMapper.getByTids(tids);
    }

    @Override
    public Integer insert(RelationNovelType relationNovelType) {
        relationTypeMapper.insert(relationNovelType);
        return relationNovelType.getRntid();
    }

    @Override
    public void update(RelationNovelType relationNovelType) {
        relationTypeMapper.update(relationNovelType);
    }

    @Override
    public void delete(List<Integer> ids) {
        relationTypeMapper.delete(ids);
    }
}




